#include "03_header.h"
//接收服务端发来的train结构体
int recvRequest(int sockfd, train_t *train){
    bzero(train, sizeof(train_t));
    //接收type
    recv(sockfd, &train->type, sizeof(int), 0);
    //接收lenth
    recv(sockfd, &train->lenth, sizeof(int), 0);
    //接收value
    recv(sockfd, &train->value, train->lenth, 0);
    return 0;
}


